﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class InterfacesAndAbstractClasses
{
    static void Main(string[] args)
    {
        ComplexNumber cn1 = new ComplexNumber(5, 2);
        ComplexNumber cn2 = 3d;
        Console.WriteLine(cn1);
        Console.WriteLine(cn2);
        Console.WriteLine("{0} + {1} = {2}",cn1, cn2, cn1 + cn2);
        Console.WriteLine("{0} - {1} = {2}", cn1, cn2, cn1 - cn2);
        Console.WriteLine("{0} * {1} = {2}", cn1, cn2, cn1 * cn2);
        Console.WriteLine("{0} / {1} = {2}", cn1, cn2, cn1 / cn2);
        Console.WriteLine("The real part of {0} is: {1}", cn1, cn1[0]);
        Console.WriteLine("{0} to double is: {1}", cn1, (double)cn1);
        Console.WriteLine("{0} to double is: {1}", cn2, (double)cn2);

    }
}

